/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author APP
*/
public class Uniform extends Distribusi{
    
    private Parameter parameter;
    private Mean mean;
    private Varians var;
    
    
    
    @Override
    public void pengertian() {
        System.out.println("Distribusi Seragam kontinu adalah distribusi peluang kontinu yang paling sederhana.\n" +
        "Fungsi padat peluang dari peubah acak seragam kontinu Xpada selang parameternya [a, b].");
    }

    @Override
    public void input() {
        parameter = new ParameterUniform();
        mean = new MeanUniform((ParameterUniform) parameter);
        var = new VariansUniform((ParameterUniform) parameter);
    }

    @Override
    public void pdf() {
        parameter.integral();
    }

    @Override
    public Mean mean() {
        return mean;
    }

    @Override
    public Varians varians() {
        return this.var;
    }

    @Override
    public void standarDeviasi() {
        System.out.println(Math.sqrt(this.var.getVarians()));
    }

 
}
